package com.buaa.repository.solr;

import com.buaa.model.solr.Paper;
import com.buaa.model.solr.Person;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.solr.repository.Query;
import org.springframework.data.solr.repository.SolrCrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by DELL on 2018/4/9.
 */
@Repository
public interface PersonSolrRepository extends SolrCrudRepository<Person,String> {


    @Query("name_s:?0 AND organization_s:?1")
    Person findPersonByNameAndOrg(String name, String organization,Sort sort);

    @Query("name_s:?0")
    List<Person> findPersonListByName(String name,Sort sort);

}
